%dXt = sigma(t)^2dt 
%sigma(t)=BM
clear all
% index J for X
betaK=15; IIpart=sparse(index2(betaK));
% time T
T = 1/2;
% time mesh 
num=50; tspan = linspace(0,T,num+1);
%sigma
s=wihandle;
%options = odeset('AbsTol',1e-12,'RelTol',1e-6);
options = [];
row=1+2*betaK+betaK*(betaK-1)/2; X0=zeros(row,1); 
% solver of X
disp('solving X')
tic
[time,X] = ode45(@randucbmsqdt,tspan,X0,options,T,betaK,s,IIpart);
toc
varitest(time,X.*X,T,'uncorrelated','oudt',num)